import 'package:flutter/material.dart';
import 'package:reader_app/page_card/base_card.dart';

///我的页面
class CardSpecial extends BaseCard {
  @override
  _CardSpecialState createState() => _CardSpecialState();
}

class _CardSpecialState extends BaseCardState {
  @override
  void initState() {
    bottomTitleColor = Colors.blue;
    super.initState();
  }

  @override
  Widget topContent() {
    //上面部分的图片和腰封
    return new Column(
      children: <Widget>[
        new Container(
          padding: EdgeInsets.only(left: 80, right: 80, top: 30, bottom: 26),
          height: 210,
          decoration: new BoxDecoration(color: Color(0xfffffcf7)),
          child: new Container(
            decoration:
                new BoxDecoration(boxShadow: [new BoxShadow(color: Colors.grey, blurRadius: 10, offset: new Offset(0, 10))]),
            child: Image.network("https://www.devio.org/io/flutter_beauty/changan_book.jpg"),
          ),
        ),
        new Container(
          decoration: BoxDecoration(color: Color(0xfff7f3ea)),
          child: new Padding(
            padding: EdgeInsets.all(15.0),
            child: new Row(
              children: <Widget>[
                new Expanded(
                    child: new Column(
                  children: <Widget>[
                    Text("长安十二时辰...."),
                    new Padding(
                      padding: EdgeInsets.only(
                        top: 10,
                      ),
                      child: Text(
                        "马伯爵",
                        style: new TextStyle(fontSize: 13),
                      ),
                    )
                  ],
                  crossAxisAlignment: CrossAxisAlignment.start,
                )),
                new Container(
                  padding: EdgeInsets.only(left: 20, right: 20, top: 5, bottom: 5),
                  decoration: new BoxDecoration(
                      borderRadius: BorderRadius.circular(20),
                      gradient: new LinearGradient(colors: [Colors.deepOrange, Colors.orange])),
                  child: new Text("分享免费领"),
                )
              ],
            ),
          ),
        )
      ],
    );
  }

  @override
  Widget bottomContent() {
    return Expanded(
      child: Column(
        mainAxisAlignment: MainAxisAlignment.start,
        crossAxisAlignment: CrossAxisAlignment.start,
        children: <Widget>[
          Padding(
            padding: EdgeInsets.only(top: 30, left: 15),
            child: Image.network(
              "https://www.devio.org/io/flutter_beauty/double_quotes.jpg",
              width: 25,
              height: 25,
            ),
          ),
          Padding(
            padding: EdgeInsets.only(left: 15),
            child: Text("揭露历史真相"),
          ),
          Expanded(
              child: new Center(
            child: bottomTitle("更多免费好书领不停>"),
          ))
        ],
      ),
    );
  }
}
